home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d13 / ritm11.arc / RIGHTIME.TXT < prev    next >
Text File  |  1991-10-07  |  49KB  |  990 lines

  1. RighTime v1.1, TestTime v1.1                       Copyright 1991, GTBecker
  2. April 28, 1991                                          All Rights Reserved
  3.  
  4.                               Shareware Notice
  5.  
  6.       This file (RIGHTIME.TXT) and evaluation program files RIGHTIME.COM and
  7. TESTTIME.COM should be contained in the distribution file.
  8.  
  9.       Neither evaluation program will run if the program file has been
  10.       modified in any way, including filename, length and content.  A
  11.       fresh distribution file of the latest version is always available
  12.       on the SBE/DFW BBS, 214/647-0670.
  13.  
  14.       These files are the copyrighted property of G.T. Becker and Air System
  15. Technologies, Inc., of Dallas, Texas, USA, 75234.
  16.  
  17.       Commercial shareware distributors must make arrangements with Air
  18. System Technologies prior to distribution of these programs.
  19.  
  20.       You may use these evaluation programs for up to one month, and you may
  21. - and are encouraged to - pass the distribution file along to others for
  22. their evaluation, but no one may modify, rename or sell the files or programs
  23. to anyone under any circumstances.  The programs will notify you when the
  24. evaluation period has elapsed.
  25.  
  26.       This document is a complete description of the programs, including the
  27. license that will be granted upon registration.  There are no surprises.  If
  28. you have questions or suggestions, or if you need assistance, you may call
  29. the telephone number at the end of this document any time during evaluation.
  30.  
  31.       We encourage you to register your use of RighTime.  Registered RighTime
  32. users receive a diskette containing the current version of the registered
  33. programs, a printed user manual and license agreement, notification of new
  34. releases, and enthusiastic support from the author when needed.  The
  35. registered version of RighTime is functionally identical to the shareware
  36. distributed evaluation version, but it lacks registration reminders, it is
  37. smaller in size, and it is serial numbered.
  38.  
  39.       Beyond the immediate tangible benefits, registration also provides
  40. support for the shareware software distribution concept.  Shareware is not
  41. free software, nor is it in the public domain.  Shareware means quality
  42. software that you try before you buy, generally at a far lower cost than a
  43. similar retail product, if one exists.  More happy shareware users mean more
  44. happy shareware authors that produce more shareware distributed program
  45. offerings.  We all benefit, but only if the users do their ultimate part of
  46. registering.  If RighTime is a useful addition to your system, please
  47. register your use.
  48.  
  49.       To register, fill in the form at the end of this document and send it
  50. with US $25 for a single machine to Air System Technologies, Inc., 14232
  51. Marsh Lane, Suite 339, Dallas, Texas, 75234, USA.  Site licensing is available.
  52.  
  53.  
  54.                                  Version 1.1
  55.  
  56.       A number of new features have been added to RighTime since the previous
  57. version (1.0a) was released, and problems that a few users encountered and
  58. reported have been fixed.  If you tried RighTime v1.0 or v1.0a and found that
  59. you could not use the program, try again with v1.1.  Please report any
  60. difficulties you have.  Sometimes your trouble can be remedied by a single
  61. telephone call, but if not, your information can be valuable in improving
  62. future releases of the programs.
  63.  
  64.       RighTime v1.1 includes these new features:
  65.  
  66.       *     DRDOS 5.0 support;
  67.  
  68.       *     CMOS RAM requirement decreased to 12 bytes;
  69.  
  70.       *     Time trim provided in hundredths of a second;
  71.  
  72.       *     Permanent disable, temporary disable and reenable;
  73.  
  74.       *     Quiet mode silences beeps in error messages;
  75.  
  76.       *     Four termination codes testable by batch ERRORLEVEL;
  77.  
  78.       *     Automatic timeset request by two criteria;
  79.  
  80.       *     CMOS backup battery failure detection;
  81.  
  82.       *     Improved TestTime accuracy;
  83.  
  84.       *     New command line switches /H, /O, /T, /E, /K, /S, /Q.
  85.  
  86.  
  87.                               What is RighTime?
  88.  
  89.       RIGHTIME.COM is a TSR for MSDOS v3.0 and later and DRDOS which will
  90. correct the PC/AT "CMOS"-type clock error up to about 5.5 minutes per day. 
  91. If RighTime is automatically and dependably installed via AUTOEXEC.BAT as
  92. suggested below, the system clock will behave as properly and accurately as
  93. one should hope the system clock of a computer would.  Written in 80286
  94. assembly language, the resident portion occupies about 3K of system memory.
  95.  
  96.  
  97.       First, here is what RighTime cannot do:
  98.  
  99.       -     RighTime cannot correct clock boards or computer motherboard
  100.             clocks that do not emulate the PC/AT hardware clock and its BIOS
  101.             support precisely.  By far, the majority of current 80286, 80386
  102.             and 80486 machines are compatible, but systems like the AT&T PC
  103.             6300, some Tandy-manufactured machines, AST Six Pack equipped PCs
  104.             and XTs, ROM-socket and floppy-connector clocks and the like are
  105.             not supported.
  106.  
  107.       -     RighTime cannot properly correct an unstable clock; most clocks
  108.             are slow or fast and they are essentially unvarying.  If your
  109.             clock wanders aimlessly, repair the hardware first.
  110.  
  111.       RighTime exploits the better qualities of each of the two clocks in
  112. your system and improves upon them by doing three fundamental things:
  113.  
  114.       *     RighTime slaves the DOS system clock (which has higher
  115.             resolution) to the hardware clock (which has higher stability),
  116.  
  117.       *     RighTime improves and maintains accuracy by regularly calculating
  118.             and applying corrections to both clocks, and
  119.  
  120.       *     RighTime monitors time set commands (and the equivalent system
  121.             calls from any program) to learn the hardware clock error rate.
  122.  
  123.       RighTime intrinsically sets the hardware clock and solves the midnight
  124. rollover date bug that exists in some DOS versions; this eliminates the need
  125. for other utility programs or drivers that perform these functions.  Unlike
  126. DOS alone, the hardware clock seconds transition will be properly set by
  127. RighTime and the time will be set to hundredths of a second resolution, and
  128. these qualities will survive through rebooting.
  129.  
  130.       Each time you set the time, RighTime will improve the accuracy of the
  131. clock error corrections and will subsequently improve the accuracy of the
  132. clocks.  It should be easy to achieve a worst-case error of less than 0.5
  133. second per day and under good conditions, less than 0.5 second per week;
  134. typical results are much better.  Command line options are provided that
  135. allow fine tuning the correction process to your system.  A trimming option
  136. provides for offset adjustments in hundredths of a second.
  137.  
  138.       An option is provided that assists in automatic timesetting by allowing
  139. RighTime to notify the AUTOEXEC batch file when a specified number of days
  140. has elapsed since the last timeset, or if the system has been inactive for
  141. too long and requires a timeset.  
  142.  
  143.       Large time changes (larger than approximately 5.5 minutes) will not
  144. affect the corrections, permitting standard time to daylight time and the
  145. converse adjustments.
  146.  
  147.       Some rogue programs apparently change the 8254 timer load constant,
  148. resulting in a suddenly fast clock which usually requires a reboot to
  149. correct.  Reexecuting RighTime will load the right value (which will restore
  150. the proper rate) and indicate the correct time without resetting the time if
  151. it is done reasonably promptly.
  152.  
  153.  
  154.            If You Are In a Big Hurry, or If You Don't Read Manuals
  155.  
  156.       You can't know how to take best advantage of a new product unless you
  157. take the time to read the instructions, but if you insist on trying RighTime
  158. before you understand what you're trying, here's a helping hand:
  159.  
  160.       1)    Make a new directory, for example:
  161.                   MD \RT
  162.  
  163.       2)    Copy RIGHTIME.COM, TESTTIME.COM and RIGHTIME.TXT into the new
  164.             directory.
  165.  
  166.       3)    Set the date, if necessary.
  167.  
  168.       4)    Run from a DOS prompt:
  169.                   \RT\RighTime /F /W /C
  170.  
  171.       5)    Set the system time very accurately with DOS's TIME command or,
  172.             far better, with a telephone timesetting program.
  173.  
  174.       6)    Add this command to your AUTOEXEC.BAT:
  175.                   \RT\RighTime /F
  176.  
  177.       7)    Reboot.
  178.  
  179.       8)    For a few days, set the time accurately immediately before you
  180.             shutdown your system for the night, and immediately after booting
  181.             in the morning.  If you never shutdown your system, set the time
  182.             accurately a few times each day.
  183.  
  184.       9)    There are other considerations, and there might be additional
  185.             features that are useful to you, so read the rest of this
  186.             document, perhaps twice.
  187.  
  188.  
  189.                                Getting Started
  190.  
  191.       To use RighTime, first decide where to store the corrections.  There
  192. are three options: disk file, unused CMOS RAM, or neither.  In general, try
  193. the disk file option first, if you can.  If you have a hard disk, you can use
  194. the disk file or probably the CMOS RAM option.  If you have only floppies the
  195. disk file option is impractical, so try the CMOS RAM option.  A diskless
  196. machine cannot use the disk option, unless it is equipped with a non-volatile
  197. RAM disk which appears to the system as any other disk would.
  198.  
  199.       The CMOS RAM option involves some initial bravado: although only the
  200. first 52 bytes of CMOS RAM are defined by the IBM PC standard (presumably
  201. leaving the last 12 bytes available), some modern BIOSs use these 12 bytes
  202. for other functions.  If you have adopted a user-specified hard disk format,
  203. for example, your specification is probably stored there.  Before attempting
  204. to use the CMOS RAM option, be forewarned that CMOS RAM contains system setup
  205. data that RighTime might inadvertently disturb; be prepared to reset the
  206. setup data if the CMOS RAM option is unsuccessful on your system.  See the
  207. Hardware Compatibility List, below.  If this dissuades you or if you are
  208. otherwise reluctant, use the disk file option if you can.
  209.  
  210.       If you choose the disk file option, RighTime will attempt to write to
  211. its own program file from time to time, so write access must be allowed.  If
  212. the "disk" is actually a non-volatile RAM disk card, the card must remain in
  213. the machine if this option is to work properly.  If you use the disk file
  214. option on a battery powered hard disk laptop, you might want to decrease the
  215. update frequency to allow your hard disk to spin down after periods of
  216. inactivity to increase the battery life (see the /U option, Command Line
  217. Syntax, below).  The disk file option causes RighTime to maintain an open
  218. handle to its program file which might present a problem when running a file
  219. defragmenting utility, but RighTime can be disabled during defragmentation
  220. and restarted afterwards (see the /K option, Killing, Disabling and
  221. Reenabling Resident RighTime, below).
  222.  
  223.       RighTime can also be configured with no correction storage, with
  224. consequential loss of some of its utility (see No Correction Storage Option,
  225. below).
  226.  
  227.       If you know how fast or slow your clock appears to run per day, you can
  228. optionally speed the learning process of RighTime by suggesting a correction
  229. to the program as a signed number in hundredths of a second - positive for a
  230. slow clock, negative for a fast clock.  For example, if your clock runs about
  231. two minutes fast per day, the suggested correction should be -12000 (120
  232. seconds times 100).  There are actually two corrections that RighTime
  233. normally applies, one while the system is running and warm, and another when
  234. the system is turned off and cool.  If you know the cool correction, you can
  235. suggest it also.  If you don't know one or either correction, RighTime will
  236. determine them anyway; it'll just take a little longer for the corrections to
  237. mature to good accuracy.
  238.  
  239.       If you need to restart RighTime and it is currently resident and
  240. running, you must first kill the resident program (see Disabling and
  241. Reenabling Resident RighTime, below).  If appropriate, the corrections that
  242. RighTime has already learned can be suggested to the new program copy. 
  243.  
  244.       If you have been using another resident driver or TSR to correct the
  245. weaknesses of your clock, remove all references to it from your CONFIG.SYS
  246. and AUTOEXEC.BAT files and, once you are confident that RighTime is all it
  247. purports to be, remove the other driver or TSR from your system.
  248.  
  249.       To get started, place RIGHTIME.COM in some directory (dev:\path, which
  250. does not need to be included in a PATH statement), and run it from the DOS
  251. prompt:
  252.  
  253.       if you choose the CMOS RAM option,
  254.  
  255.             dev:\path\RighTime /R /Wwarm /Ccool
  256.                   or
  257.             dev:\path\RighTime /R /W /C
  258.  
  259.       if you choose the disk file option,
  260.  
  261.             dev:\path\RighTime /F /Wwarm /Ccool
  262.                   or
  263.             dev:\path\RighTime /F /W /C
  264.  
  265.       As discussed above, the /W and /C switches are required, but the warm
  266. and cool parameters are optional in this first execution.
  267.  
  268.       Also, in your AUTOEXEC.BAT file, add:
  269.  
  270.       if you choose the CMOS RAM option,
  271.  
  272.             dev:\path\RighTime /R
  273.  
  274.       if you choose the disk file option,
  275.  
  276.             dev:\path\RighTime /F
  277.  
  278.       Do not use the /W or /C switches in the AUTOEXEC.BAT invocation; if you
  279. do, you will defeat the learning process.  Use the /W and/or /C switches only
  280. when starting - or restarting - the error correction learning process of
  281. RighTime; normally this needs to be done only once, the very first time you
  282. run RighTime from the DOS prompt.  If you use other options to modify the
  283. behavior of RighTime, these options must be included in the AUTOEXEC.BAT
  284. invocation, and should be included in the initial DOS prompt invocation.
  285.  
  286.       RighTime cannot be INSTALLed in the CONFIG.SYS file.
  287.  
  288.       In the examples above and in those that follow, substitute your
  289. appropriate device specification and the program file path.
  290.  
  291.       For example, I put RIGHTIME.COM in C:\DOS\TIME, my clock runs about 1.5
  292. seconds fast per day when warm, and I use the CMOS RAM option.  I started by
  293. running:
  294.  
  295.             C:\DOS\TIME\RighTime /R /W-150 /C
  296.  
  297. and I added this line to my AUTOEXEC.BAT file:
  298.  
  299.             C:\DOS\TIME\RighTime /R
  300.  
  301. Had I chosen the disk file option, I would have run:
  302.  
  303.             C:\DOS\TIME\RighTime /F /W-150 /C
  304.  
  305. and I would have added this line to my AUTOEXEC.BAT:
  306.  
  307.             C:\DOS\TIME\RighTime /F
  308.  
  309.       If RighTime encounters difficulty during its installation, it will
  310. report one of several messages and terminate (see Installation Error
  311. Messages, below).  A successful installation will display the corrections, a
  312. copyright notice, and an "Installed" message.
  313.  
  314.  
  315.                               Setting the Time
  316.  
  317.       Now that RighTime is installed and running, set the date and time as
  318. accurately as possible.  If you have access to a time standard, use it.  For
  319. best accuracy, use a NIST telephone service time setting program such as
  320. Professional TimeSet v6.0 by Peter Petrakis (register with him, too). 
  321. Alternatively, you can listen to WWV or CHU or a radio network news broadcast
  322. and be prepared to set your clock when you hear the beep on the minute or
  323. hour.  Don't use a radio station that is airing a call-in talk show; the
  324. audio is usually delayed six to ten seconds on such programs to allow for
  325. profanity dumping, and so the beep will be equally late.  An all-news format
  326. station is probably not delayed.  To be certain, call the radio station and
  327. ask for engineering; they will know.  Local telephone time services are
  328. usually poor; don't trust that they are correct.  What is important is
  329. accuracy; RighTime needs a reference to initially learn from, and unless you
  330. care to (and know how to) automate it, you are it.
  331.  
  332.       From this moment on, RighTime will monitor each time set occurrence,
  333. learning from your adjustments.  Whenever you notice or suspect that the
  334. indicated DOS system time is insufficiently correct to satisfy you, reset it
  335. accurately.  You will find that the clocks will become more and more accurate
  336. and the need for adjustment will decrease, becoming infrequent; however, you
  337. must set the time accurately at least once per month (an option is provided
  338. to assist in automating this - see Errorlevels, below).
  339.  
  340.       Allow sufficient time to elapse between time sets so that enough error
  341. exists for RighTime to use in its correction calculations; the more time that
  342. you allow, the better the correction factors that are determined.  Time sets
  343. that are separated by less than 30 minutes will be disregarded.  Careless
  344. timesets will result in poor correction or even wild clock behavior; remember
  345. that you are "training" the program, so do it well.  If you are eager, four
  346. hours will probably be an adequate initial wait; of course, you can use your
  347. system as you normally would during this time.
  348.  
  349.       When you turn your computer on, allow it to boot and then, if it is
  350. necessary, set the time accurately within ten minutes of boot.  Time
  351. adjustments that are performed within ten minutes of boot will affect the
  352. cool correction; adjustments performed after that ten-minute period will
  353. affect the warm correction.
  354.  
  355.       Each time you reboot, RighTime will display the current corrections. 
  356. After a few days of your diligent time setting, the corrections should settle
  357. to fairly constant numbers which will be true indications of the uncorrected
  358. performance of your hardware clock.  Once it is installed, you can also
  359. display the current corrections by simply running RighTime again at a DOS
  360. prompt (no parameters are required).  The correction that is currently being
  361. applied to the DOS clock will be displayed and a functional self test will
  362. also be performed, verifying that RighTime is currently running properly on
  363. your system (see Error Messages, below).
  364.  
  365.       As long as RighTime is in use and you've been diligent in your
  366. adjustments, and the corrections have matured, the hardware clock error will
  367. not be more than 0.5 second, and the DOS clock will be much more accurate
  368. than that.  In fact, the DOS clock error can be less than 0.01 second; but
  369. since DOS can't express the time any better than the 55 millisecond tick rate
  370. permits, this accuracy might not be easily seen.  Nevertheless, it is there. 
  371. A tool is provided with RighTime that allows verification and visualization
  372. of RighTime's actions (see TestTime, below).
  373.  
  374.       RighTime has limits of one week of inactivity, and one month between
  375. time sets, that can be corrected to a maximum of 5 minutes, 27.67 seconds per
  376. occasion; beyond that, all bets are off.  In that case, unpredictable, and
  377. probably incorrect, clock changes can occur, but RighTime will advise you of
  378. its difficulty if it can.  For example, if your clock runs two minutes slow
  379. per day and you don't use the system for three full days, when you boot up
  380. you will receive a message warning that the clock needs to be adjusted
  381. manually (or automatically; see Errorlevels, below).  The subsequent
  382. adjustment will not affect the corrections.
  383.  
  384.       Keep in mind that the date is the most significant part of the time. 
  385. If you change only the date, you are in fact making a very large change in
  386. the time.  The change will not affect the corrections due to its large size,
  387. but it will very likely change the seconds synchronization, and that, in
  388. turn, will create additional error at the next time set.  A solution to this
  389. problem is to set the time twice after you change the date; first,
  390. deliberately set the time an hour off, and then set the time accurately. 
  391. Neither of these two timesets will affect the corrections due to their size.
  392.  
  393.  
  394.                         No Correction Storage Option
  395.  
  396.       If you have difficulty with both the CMOS RAM and disk file options or
  397. you need or wish to use neither option, RighTime can still correct the clocks
  398. for as long as the system runs continuously.  What RighTime has learned will
  399. be lost when you reboot or power down, and there can be no cool correction. 
  400. Otherwise, all of the comments above apply.  If you suggest a good warm
  401. correction and you set the clock after you boot, RighTime will serve well.
  402.  
  403.       To run RighTime in this mode, add the following line in the
  404. AUTOEXEC.BAT file:
  405.  
  406.             dev:\path\RighTime /N /Wwarm
  407.                   or
  408.             dev:\path\RighTime /N /W
  409.  
  410.       You might want to follow this with a TIME command (perhaps preceded by
  411. a DATE command) to remind you to set the clock at each boot.
  412.  
  413.  
  414.              Killing, Disabling and Reenabling Resident RighTime
  415.  
  416.       Earlier versions of RighTime (which were running with the disk file
  417. option) reportedly could cause occasional loss of data or system lockups
  418. during high-speed communication sessions.  If you encounter similar
  419. difficulties with RighTime v1.1, you can temporarily suspend the function of
  420. RighTime and reenable it later.  The disabling and reenabling command lines
  421. can be placed in a batch file surrounding the invocation of the offended
  422. program.  RighTime should not be disabled for an extended period.
  423.  
  424.       In the Software Carousel environment, RighTime seemed to interfere with
  425. the automatic partition starting process of the task switcher.  This problem
  426. was cured by installing and then immediately disabling RighTime in
  427. AUTOEXEC.BAT, then reenabling RighTime when the last partition was started. 
  428.  
  429.       Once RighTime is resident, it can be disabled by running at a DOS
  430. prompt:
  431.  
  432.             dev:\path\RighTime /T
  433.  
  434. Resident RighTime can then be reenabled by running:
  435.  
  436.             dev:\path\RighTime /E
  437.  
  438.       Programs that defragment or reorganize the hard disk should always be
  439. run with no open files.  When using RighTime's disk file option, an open
  440. handle is maintained to the program file, so before running a disk
  441. reorganizing utility, RighTime should be killed.  After the utility
  442. completes, RighTime can be restarted with the same command line used in the
  443. AUTOEXEC.BAT file.  This precaution is not required when using the CMOS RAM
  444. option.
  445.  
  446.       RighTime can be irreversibly disabled (or "killed") by running:
  447.  
  448.             dev:\path\RighTime /K
  449.  
  450. The /K switch will cause the function of RighTime to terminate, but the
  451. memory that was allocated to RighTime will remain allocated and unavailable. 
  452. If you wish, another copy of RighTime can be started with different options. 
  453. In that case, a memory map will indicate multiple RighTime allocations, but
  454. only one will be active.
  455.  
  456.       If it is your intent to permanently remove RighTime from your system,
  457. you can do so by killing the resident program and removing the RighTime
  458. invocation in your AUTOEXEC.BAT.  Rebooting is not immediately necessary.
  459.  
  460.  
  461.                                  Errorlevels
  462.  
  463.       RighTime provides four unique termination codes.  The termination code
  464. can be tested in a batch file to guide subsequent operations.
  465.  
  466.       Code value  Indication
  467.  
  468.             0     Installed normally, cool correction within range, last
  469.                   timeset within specified elapsed period.
  470.  
  471.             1     Installed, cool correction within range, but more than 
  472.                   the specified period has elapsed since a timeset.
  473.  
  474.             2     Installed, but cool correction was out of range (the
  475.                   system has been inactive too long), so a timeset is
  476.                   externally required.
  477.  
  478.           255     Not installed due to syntax error, insufficient memory, 
  479.                   incompatible hardware, etc.
  480.  
  481.       These codes can be tested in the AUTOEXEC batch file with the
  482. ERRORLEVEL batch command.  For example, if the termination code is 1, then
  483. more than 28 days have elapsed since the last timeset (this duration can be
  484. changed with the /S option).  It would be wise to have a NIST telephone
  485. service time setting program such as Professional TimeSet v6.0 automatically
  486. set the time in this situation to prevent RighTime from exceeding its one
  487. month limit, or you could cause execution of the system DATE and TIME
  488. commands to urge the user to set them manually.  
  489.  
  490.  
  491.                                Error Messages
  492.  
  493.       RighTime might report one of the following messages:
  494.  
  495. "DOS version 3.0 or later is required"
  496.       The PC/AT "CMOS" hardware clock is not supported by earlier DOS
  497.       versions.
  498.  
  499. "System is not 80286 code compatible"
  500.       RighTime expects that the system processor is at least an 80286.  The
  501.       80C286, 80386(DX), 80386SX, and the 80486 are also code compatible with
  502.       the 80286.  Systems that use the 8086, 8088, 80186, 80188, and the NEC
  503.       V-series processors will not run RighTime.
  504.  
  505. "No AT hardware clock is present or clock is not running"
  506.       Either a hardware clock or BIOS failure prevents use of the clock, or
  507.       the clock chip is not installed in the system.
  508.  
  509. "System skipped a hardware clock alarm"
  510.       RighTime has not passed a self test, but this condition can
  511.       occasionally occur normally.  Try again in a minute or so.  If this
  512.       message persists, please notify the author.
  513.  
  514. "Alarm is not supported by BIOS"
  515.       The BIOS has reported an unsuccessful attempt to set the clock alarm
  516.       feature.  The BIOS is not compatible with RighTime.
  517.  
  518. "Already installed"
  519.       RighTime is currently resident and running in the system.
  520.  
  521. "Correction storage switch is required"
  522.       Either the disk file (/F), CMOS RAM (/R) or no storage (/N) option must
  523.       be specified in the command line.
  524.  
  525. "Invalid switch"
  526.       An unrecognized option switch is present in the command line.
  527.  
  528. "Invalid parameter"
  529.       A value associated with an option is inappropriate.
  530.  
  531. "Program has been altered"
  532.       RIGHTIME.COM or TESTTIME.COM has been modified in some way.  This
  533.       message might indicate the presence of a software virus in your system. 
  534.       Immediately delete the program from your system and replace it with the
  535.       distributed program.  If the original distributed copy displays this
  536.       message, notify the author.  This message will also result from an
  537.       attempt to INSTALL RighTime in the CONFIG.SYS file.
  538.  
  539. "Enable resident RighTime first"
  540.       RighTime has been disabled with the /T switch.  Reenable the program
  541.       with the /E switch.
  542.  
  543. "Hardware clock indicates low or no battery"
  544.       The hardware clock and CMOS RAM are powered by a battery during periods
  545.       when the system is turned off.  Replace the battery or batteries or
  546.       replace the clock module if the battery is self-contained.
  547.  
  548. "Calculated correction is too large"
  549.       RighTime has determined that a single adjustment of more than about 5.5
  550.       minutes is required.  The time must be set manually or via a subsequent
  551.       program that can be invoked within AUTOEXEC.BAT by testing the
  552.       termination code with ERRORLEVEL.
  553.  
  554.  
  555.                        PC/AT and MSDOS Clock Esoteria
  556.  
  557.                                     18.2
  558.  
  559.       DOS historians say that the designers of the PC tried to do the DOS
  560. system programmers a favor by dividing an hour into 65536 parts, or about
  561. 18.20444444 ticks per second, making the most significant 16 bits of the 32
  562. bit tick count directly indicate the hour and theoretically simplifying the
  563. system code.  Somehow the hardware didn't turn out that way, resulting in
  564. about 176 extra ticks per day.  The 8254 timer/counter clock input of 1193180
  565. Hz and its counter 0 load constant of 0 (effectively 65536), yielded a
  566. hardware tick rate of approximately 18.20648193 ticks per second, and that
  567. remains so today.  That looks like a small difference, but it amounted to an
  568. almost ten-second gain per day.
  569.  
  570.       DOS designers corrected for the hardware error by redefining the number
  571. of ticks per day to include the extra ticks, and a standard was set: the
  572. exact ticker rate was defined by the quotient of the number of ticks per day
  573. and the number of seconds per day (1573040/86400), which is approximately
  574. 18.20648148 ticks per second.  When they did that, they made it possible to
  575. convert from ticks to time and from time to ticks in two ways, each way
  576. exact, but one according to the PC hardware implementation and one according
  577. to the day-length standard definition.
  578.  
  579.       Using only 16 bit integer arithmetic, the conversion that matches the
  580. PC hardware requires multiplying the current time in hundredthseconds by
  581. 59659 (which is 1193180/20), dividing that product by 65536 (discard the
  582. least significant 16 bits), then dividing that quotient by 5 to yield the
  583. tick count.  The resulting rate is approximately 0.1820648193 ticks per
  584. hundredthsecond, which is the same as the hardware rate.  The conversion for
  585. the day-length standard can be accomplished by multiplying the current time
  586. in hundredthseconds by 19663 (since 1573040/86400 = 19663/1080), dividing
  587. that product by 10800, then dividing that quotient by 10 to yield the tick
  588. count.  The resulting rate is approximately 0.1820648148 ticks per
  589. hundredthsecond, the correct day-length standard rate.
  590.  
  591.       Ironically, MSDOS authors ignored their own day-length standard and
  592. chose to match the hardware to determine the time.  The resulting error
  593. (compared to the day-length standard) is very small, only 0.039 tick per day,
  594. but for some requirements that can be significant.  For example, if the
  595. resulting time is rounded or truncated to whole seconds, the two methods will
  596. yield different results for some values.  For most applications, though, the
  597. choice won't matter.
  598.  
  599.       Often, the number 18.2 or the period 55 milliseconds is used to
  600. describe the system clock (interrupts 8 and 1Ch) tick rate.  That is never
  601. the correct number, but an approximation.  Almost all PC "compatible"
  602. machines use this 18.2 standard tick rate, but there are exceptions; the AT&T
  603. 6300, for example, uses 18.75.
  604.  
  605.                      Stability, Accuracy and Resolution
  606.  
  607.       Frequently confused, these three qualities are different and are only
  608. obliquely related, although each is required to exist in any good clock. 
  609. They can be prioritized with little difficulty.  Stability is foremost.  Even
  610. if lacking in other qualities, a stable clock is useful if you know what to
  611. expect of it; an unstable clock generates worthless noise.  Accuracy can only
  612. be meaningful if the clock is stable.  Resolution is required only to meet
  613. the requirements of the clock's task; to catch a train on time, for example,
  614. you don't need hundredths of a second resolution, just an accurate, stable
  615. clock that will tell the time to minutes, or maybe only hours.
  616.  
  617.              Translation Gain, Resolution and Truncation Losses
  618.  
  619.       Suppose that some accurate clock resolves only to minutes, and you read
  620. the clock often at random, or asynchronous, times.  Your time reading will be
  621. correct if it is made at the instant the minutes have incremented from one
  622. number to the next, but your reading will appear to be just under one minute
  623. low if made at the instant before the next minute increment.  If you do this
  624. enough, the average or mean error of your readings will prove to be one-half
  625. minute low.  This is the mean resolution loss.  An artifact of any finite
  626. resolution, resolution loss is present when asynchronously reading any
  627. accurate digital clock.
  628.  
  629.       Some applications require resolution loss compensation, which can be as
  630. simple as increasing the time by one-half of the unit of resolution of the
  631. clock.  Postcompensation can be applied when the time is read, or
  632. precompensation can be applied when it is set.  In the example, the range of
  633. the compensated error would extend from 30 seconds low to 30 seconds high;
  634. the mean resolution loss would be zero.  More sophisticated compensation
  635. schemes can synthetically increase the effective resolution of the clock, but
  636. resolution loss, though smaller, remains unavoidable.
  637.  
  638.       A similar effect, translation gain, occurs when asynchronously setting
  639. a digital clock.  The instant of time set can occur anytime between one
  640. regular increment and the next.  If set at the instant after an increment, no
  641. error results; if set immediately prior to an increment, however, the clock
  642. will be effectively set one unit too high.  On the average, asynchronous
  643. clock sets will produce a clock time that is one-half unit of resolution
  644. high.  Negative precompensation of one-half unit of resolution will
  645. compensate for translation gain.
  646.  
  647.       Truncation loss is an effect that results from the disregard of digits
  648. of low significance.  When converting from one time base to another, the
  649. result is often not an integral number in the new time base.  If the
  650. fractional part is ignored, loss results.  Arithmetic rounding to the nearest
  651. unit of resolution is effective compensation and is easy to implement by
  652. adding one-half unit of resolution; the fractional part of the sum is then
  653. discarded by the time set function.
  654.  
  655.       In the PC/AT, all of these compensations are useful and, when combined,
  656. they are easy to implement.  Translation and truncation errors are intrinsic
  657. to the function of RighTime and are compensated.  Since few application
  658. programs - nor MSDOS itself - consider resolution loss, it is precompensated
  659. by default; DRDOS 5.0, however, includes resolution loss compensation. 
  660. RighTime's /H0 option should be used on DRDOS systems.
  661.  
  662.  
  663.                                   TestTime
  664.  
  665.       Included with RighTime is a program tool that can provide some
  666. interesting insight into the relationship of the clocks in your system and
  667. the function of RighTime.  TestTime takes no command line parameters.  It
  668. will determine and express whether or not RighTime is running in the system,
  669. and it provides a continuous single line display of the clock system status.
  670.  
  671.       The status line is terse:
  672.  
  673.             H[date:hh:mm:ss(:aa)] D[date:hh:mm:ss] corr diff distrib
  674.  
  675. where:
  676.  
  677.       H is the hardware clock data.  (:aa) is the alarm seconds data. 
  678.             While RighTime is running, the alarm seconds will increment in
  679.             four second steps;
  680.  
  681.       D is the DOS system clock data;
  682.  
  683.       corr is the current correction being applied to the DOS
  684.             clock in hundredthseconds, if RighTime is resident;
  685.  
  686.       diff is the signed time difference between the hardware and DOS
  687.             clocks in seconds.  A positive difference indicates that the DOS
  688.             clock leads the hardware clock (it displays a higher, or later,
  689.             time).  Since DOS can only express time to 55 millisecond
  690.             resolution in hundredthseconds, the difference is determined by
  691.             a 100-sample moving average method whose accuracy improves with
  692.             time.  The last character of diff will initially be an approxima
  693.             (a wavy equal sign) to indicate that full accuracy has not been
  694.             achieved; it will change to an equal sign or a one-half sign when
  695.             the difference is accurate.  A one-half sign indicates that the
  696.             difference value is between hundredths (an average of 5
  697.             milliseconds of resolution);
  698.  
  699.       distrib contains three numbers corresponding to the percentage of 
  700.             difference samples that are negative, zero, and positive.  When
  701.             the average difference is zero, the distribution of differences
  702.             should ideally be balanced around zero.  As the DOS clock drifts
  703.             away from the hardware clock, the balance will shift until all
  704.             samples are positive or negative.
  705.  
  706.       An arrow to the left of each seconds data indicates which data last
  707. changed.
  708.  
  709.       You can use TestTime to learn much about the behavior of the two clocks
  710. in your system.  Try running it without RighTime installed and notice that
  711. the DOS clock is never the same as the hardware clock.  Set the time and run
  712. TestTime again.  If your DOS sets the hardware clock, check to see if the
  713. seconds are synchronized, which is indicated by a diff value of zero.  They
  714. probably are not.  Run TestTime some time later and see if the relationship
  715. between the clocks has changed; there's a good chance that it will have. 
  716. Which, if either, is correct?  Try these things with RighTime installed and
  717. see the difference for yourself.  If RighTime is doing its job, you should
  718. see that corr and diff are essentially the same value - the former is the
  719. cause, and the latter is the effect.
  720.  
  721.       If the corr and diff values differ by some small, fixed amount, you can
  722. trim RighTime with the /O option to achieve better accuracy.  One way to
  723. determine the proper trimming offset is by starting RighTime with a /W0
  724. switch, then running TestTime.  Making certain that the corr value is zero
  725. (it should be, since you started RighTime with /W0), let TestTime run 100
  726. seconds or more; the approxima will be replaced by an equal sign or one-half
  727. sign.  If the diff value is then not zero, use its complement value as the
  728. trimming offset with the RighTime /O switch.  For example, if the difference
  729. is -00.02 second, the proper offset trim should be +2 hundredthseconds, so
  730. the proper RighTime option expression would be /O+2.
  731.  
  732.       Since TestTime measures the difference between the two clocks with a
  733. moving average, the diff value will lag the corr value.  For warm correction
  734. values of 864 hundredthseconds per day or smaller this presents no problem,
  735. but for larger daily correction values the current corr value will change
  736. within the 100 second window of TestTime.  TestTime will never "catch up"
  737. with the correction, so the indicated diff value will be somewhat low under
  738. these conditions.
  739.  
  740.  
  741.                          Briefly, How RighTime Works
  742.  
  743.       Every four seconds, RighTime reads the hardware clock time and
  744. calculates and sets the proper system time tick count.  As usual, DOS
  745. continues to increment that count at each 55 millisecond timer tick interrupt
  746. and uses the count to determine the time whenever it is requested.
  747.  
  748.       When the user or an application program resets the time, RighTime
  749. determines the sign and magnitude of the adjustment and uses this data to
  750. modify correction factors that it maintains.  RighTime normally stores these
  751. corrections in CMOS RAM or in its own program file on disk.
  752.  
  753.       Every two minutes, RighTime stores the current time so the period of
  754. inactivity can be determined when the system is next booted.  The proper
  755. (cool) adjustment can then be calculated and the hardware clock can be
  756. adjusted if it is required.  If the cool adjustment spans midnight, the date
  757. will be appropriately adjusted.
  758.  
  759.       RighTime provides a plus or minus 500 millisecond correction range. 
  760. When the calculated system clock time and the hardware clock time differ by
  761. 500 milliseconds, RighTime advances or retards the hardware clock as needed
  762. to keep the correction within range.  This adjustment is automatic and will
  763. not affect the DOS clock, which remains correct at all times.
  764.  
  765.       RighTime takes interrupt 4Ah and hooks interrupts 8h, 1Ah, 21h, 28h and
  766. 2Fh, and it is TesSeRact compatible.  Use of the features of the hardware
  767. clock is central to the function of RighTime, so the hardware clock is
  768. strongly guarded.  While RighTime is installed, any attempt (via interrupt
  769. 1Ah) to set the hardware clock time, date or alarm time, or to disable the
  770. alarm, will be ignored and will produce an error indication to the offending
  771. program.  If interrupt 4Ah is taken by another program, it will be recovered
  772. by RighTime.  The program is resistant to modifications.
  773.  
  774.  
  775.                              Command Line Syntax
  776.  
  777.       If you use other options to modify the behavior of RighTime, the
  778. options (except options /W and /C) must be included in the AUTOEXEC.BAT
  779. invocation, and should be included in the initial DOS prompt invocation. 
  780. Options /W and /C must be specified in the initial DOS prompt invocation and
  781. must not be specified in the AUTOEXEC.BAT invocation.  The options are not
  782. case-sensitive (either /f or /F will work) and space between options is not
  783. required.  There must be no space between an option switch and its related
  784. parameter.
  785.  
  786.       RighTime [ [{/F | /R[addr] | /N}] [/W[[{+|-}]warm]] [/C[[{+|-}]cool]]
  787.             [/Dmin] [/Umin] [/H[{0|1}]] [/O[{+|-}]trim] [/Sn] [/Q] |
  788.             [{/K | /T | /E}] ]
  789.  
  790. where:
  791.  
  792.       /F causes RighTime to store corrections in and retrieve corrections 
  793.             from its own program file;
  794.  
  795.       /R causes RighTime to store corrections in CMOS RAM;
  796.  
  797.       /Raddr causes RighTime to store corrections in CMOS RAM at a specific
  798.             location other than the default address of 63.  This location is
  799.             that of the last of 12 bytes.  This option is potentially
  800.             harmful, since a careless value might allow RighTime to overwrite
  801.             setup data.  Inadvertently changing a hard disk type, for
  802.             example, can lead to sadness.  Be careful;
  803.  
  804.       /N disables correction storage;
  805.  
  806.       /W sets initial warm correction rate in hundredthseconds per day
  807.             (default 0, maximum +32767 or -32768);
  808.  
  809.       /C sets initial cool correction rate, as above;
  810.  
  811.       /D changes the cool adjust period allowance (after boot) from the 10
  812.             minute default.  The valid range is 1 to 60.  Consider this
  813.             option if your system exhibits a large difference in warm and
  814.             cool corrections and cabinet temperature is suspect.  You should
  815.             also consider that the clock rate might be affected by lower
  816.             supply voltage when the system is off;
  817.  
  818.       /U changes the CMOS RAM or disk file update period from the two
  819.             minute default.  The valid range is 2 to 60, and the value should
  820.             be even.  If you think the default is unnecessarily frequent, try
  821.             this option.  Remember that this is part of the cool correction
  822.             process, and less frequency might affect correction accuracy in
  823.             severe situations;
  824.  
  825.       /H sets positive half-tick compensation on (1) or off (0).  The
  826.             default is on (1) for MSDOS systems.  Off (0) should be used on 
  827.             a DRDOS-equipped system, which includes its own compensation;
  828.  
  829.       /O allows DOS clock offset trim in hundredthseconds.  Default is 0; the
  830.             valid range is -99 to +99.  This can be used to compensate for
  831.             fixed system overhead in the operating system, or to anticipate
  832.             relay and contactor actuation delays and motor start times in
  833.             process control system applications;
  834.  
  835.       /T temporarily disables RighTime function;
  836.  
  837.       /E reenables RighTime function;
  838.  
  839.       /K irreversibly disables (kills) RighTime function.  The memory that is
  840.             occupied by RighTime remains allocated and unavailable;
  841.  
  842.       /S causes RighTime to set the program termination code, which can 
  843.             be tested with ERRORLEVEL in the AUTOEXEC batch file if the
  844.             duration since the last timeset exceeds n days.  The default is
  845.             28 days;
  846.  
  847.       /Q will mute any error message beeps.
  848.  
  849.  
  850.                            Hardware Compatibility
  851.  
  852.       RighTime requires a hardware real time clock that is compatible with
  853. the stock PC/AT part, an MC146818.  The Dallas Semiconductor DS1287 is one
  854. such part.  Some modern PC/AT implementations provide an embedded hardware
  855. clock, not a separate part, that is fully compatible.
  856.  
  857.       The hardware clock and CMOS RAM usability depends upon the hardware and
  858. the BIOS:
  859.  
  860.       *     The Tandy 1000TL hardware is not compatible.
  861.  
  862.       *     The Tandy 3000 and an unlabeled AT clone with an Award 286 BIOS
  863.             do not support the alarm feature of the hardware clock and are
  864.             not compatible with RighTime.
  865.  
  866.       *     Toshiba laptops will not allow the use of CMOS RAM but no ill
  867.             effects result from trying aside from a checksum error at the
  868.             next boot which requires only a key press to correct.  Use the
  869.             disk file (/F) option.
  870.  
  871.       *     To date, all other AMI, DTK, Oak and Phoenix BIOS ROMs have
  872.             worked well.
  873.  
  874.  
  875.                              If You Have Trouble
  876.  
  877.       Please note the symptoms and circumstances as thoroughly as is
  878. reasonably possible and contact
  879.  
  880.       Tom Becker
  881.       Air System Technologies, Inc.
  882.       14232 Marsh Lane, Suite 339
  883.       Dallas, Texas  75234  USA
  884.  
  885.       Telephone:  214/402-9660
  886.       SBEDFW BBS: 214/647-0670
  887.       Fidonet:    1:124/1213.0
  888.       CompuServe:   76436,3210
  889.  
  890.                         Software License Agreement
  891.  
  892.       When you register, this will be the agreement between you (the user)
  893. and Air System Technologies to which both parties are bound upon the payment
  894. and acceptance of the license fee, which is part of the registration fee.
  895.  
  896.       Grant of License
  897.       In consideration of the payment of each license fee by the user to Air
  898. System Technologies, Air System Technologies will license to the user a
  899. nonexclusive right to use one copy of each of the software programs (RighTime
  900. and TestTime) on one computer at a time.  The license is expressly for
  901. program use only, per the terms of the license.  No other rights are implied.
  902.  
  903.       Ownership of Software
  904.       Air System Technologies is the owner of the software programs and holds
  905. full title to them.  The user may own the physical media on which the
  906. software programs are recorded, including the original disk which is provided
  907. by Air System Technologies to the user, but the user does not own the
  908. software programs nor any copy of the software programs.
  909.  
  910.       Copies
  911.       The software programs and the documentation are copyrighted and
  912. therefore may not be copied without permission.  Permission is granted to the
  913. licensed user to make copies of the software programs and the documentation
  914. as required in the conventional course of computer system data backup. 
  915. Permission is granted to copy the shareware distribution file in its
  916. complete, unmodified form.  No other permission to copy is granted.
  917.  
  918.       Use and Transfer
  919.       The Grant of License applies only to one copy of each of the software
  920. programs.  Simultaneously functional resident copies of the software programs
  921. each require licensing.  You may not transfer any copy (except the shareware
  922. distribution file) of the software programs to a computer which is not under
  923. your control, nor may you rent, lease, sell or otherwise assign control of
  924. the software programs to anyone.
  925.  
  926.       Termination
  927.       The license is in effect until it is terminated.  When the license is
  928. terminated, the user's rights that are granted by the license are revoked. 
  929. The license is automatically terminated upon violation of any of its terms,
  930. without notice.
  931.  
  932.       Disclaimer of Warranty
  933.       No warranty of performance or suitability is expressed or implied. 
  934. Every effort has been made to make the software programs deliver as the
  935. documentation describes, but the correctness for your application or
  936. environment cannot be assured.  Air System Technologies cannot assume
  937. responsibility for the failure of the software programs, nor for any
  938. consequence of their use.
  939.  
  940.  
  941.       RighTime Usage Registration Form               Evaluation version 1.1
  942.  
  943.       Fill out this form, enclose the required funds and mail to:
  944.  
  945.       Air System Technologies, Inc.
  946.       14232 Marsh Lane, Suite 339
  947.       Dallas, Texas  75234  USA
  948.  
  949.  
  950.       I would like to register the use of RighTime.
  951.  
  952.  
  953.       Name:________________________________________________________________
  954.  
  955.       Business name:_______________________________________________________
  956.  
  957.       Address:_____________________________________________________________
  958.  
  959.               _____________________________________________________________
  960.  
  961.       City:______________________________ State:_________ Zip:_____________
  962.  
  963.       Telephone:_________________________
  964.  
  965.  
  966.       Where did you get RighTime?__________________________________________
  967.  
  968.  
  969.       Registered RighTime programs are serial numbered.  Registration is 
  970.       required for each copy of RighTime that is simultaneously machine
  971.       resident.  If you have, for example, three machines on which you want
  972.       to run RighTime, please register for three machines.
  973.  
  974.       Single machine registration fee is $25.
  975.       Each additional machine registration fee is $20.
  976.  
  977.  
  978.       How many copies of the RighTime package do you want?_________________
  979.  
  980.       On what media?  5.25"/360K______  3.25"/720K______
  981.  
  982.  
  983.       Total enclosed:  US$____________
  984.       Make your check or money order payable to Air System Technologies.
  985.  
  986.       Does your business require an invoice?____________
  987.  
  988.  
  989.                                  Thank You!
  990.